import { ApiProperty } from "@nestjs/swagger";

export class UploadFileVO {
    @ApiProperty({ description: "文件目录ID" })
    dirId: number; // 目录ID
    @ApiProperty({ description: "原文件名", example: "test.jpg" })
    originalName: string;
    @ApiProperty({ description: "文件类型", enum: ["image", "video", "audio", "doc", "other"] })
    fileType: string; // 5类文件类型：图片、视频、音频、文档、其他
    @ApiProperty({ description: "文件大小", example: 1024 })
    size: number;
    @ApiProperty({
        description: "文件 path 路径，可与服务host拼接成完整路径",
        example: "/storage/file/file-1762944910732_931537217-&video_mp4&-video.mp4"
    })
    path: string;
    @ApiProperty({
        description: "文件访问URL，基于流式传输接口",
        example: "http:/localhost:7001/api/v1/storage/file/file-1762944910732_931537217-&video_mp4&-video.mp4"
    })
    url: string;
    @ApiProperty({
        description: "文件 path 路径，基于静态资源服务",
        example: "/static/video/file-1762944910732_931537217-&video_mp4&-video.mp4"
    })
    staticServePath: string;

    @ApiProperty({
        description: "文件访问URL，基于静态资源服务",
        example: "http:/localhost:7001/static/video/file-1762944910732_931537217-&video_mp4&-video.mp4"
    })
    staticServeUrl: string;

    @ApiProperty({ description: "缩略图地址", example: "", required: false })
    thumbnailUrl?: string; // 缩略图地址
}
